package com.music.lib.xiami.support;

import com.lcx.core.Scanner;

/**
 * Jsoup Support
 */
public class Jsoup {

    private static Class<?> jsoupClass;
    static {
        try{
            jsoupClass = Scanner.getUrlLoader().loadClass("org.jsoup.Jsoup");
        }catch (Exception e){}
    }

    public static Document parse(String html){
        try {
            Object document = jsoupClass.getMethod("parse",new Class<?>[]{String.class}).invoke(null,html);
            return new Document(document);
        }catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

}
